from django.urls import path, re_path

from apps.user import views

urlpatterns = [
    path('register/', views.RegisterView.as_view(), name="register"),
    path('login/', views.LoginView.as_view(), name="login"),
    path('logout/', views.LogoutView.as_view(), name="logout"),
    re_path(r'usernames/(?P<usernames>[1-9a-zA-z]{5,20})/count/$', views.UsernameView.as_view(), name="username_count"),
    re_path(r'mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileView.as_view(), name="mobiles_count"),
    path('usercenter/', views.UserCenterView.as_view(), name="user_center"),
    path('address/', views.AddressView.as_view(), name="user_address"),
    path('password/', views.PasswordView.as_view(), name="password"),
    path('browse_histories/', views.HistoryView.as_view(), name="histories"),

]
